Solution:
project_ids = ['02134', '24253'] project_id = '02135' if not project_id in project_ids: project_ids.append(project_id) print(project_ids)